package com.rgs.se.design.factory.simple;


import com.rgs.se.design.factory.Student;
import com.rgs.se.design.factory.Teacher;

/**
 * @author Ren Gaoshuai
 * @ClassName TestMain
 * @Description 工厂模式：简单工厂模式，工厂方法模式，抽象工厂模式
 * @date 2022-02-28 15:53
 **/
public class TestMain {
    public static void main(String[] args) {

        Student student = PersonFactory.getPerson(Student.class);
        Teacher teacher = PersonFactory.getPerson(Teacher.class);

        Student student1 = (Student) PersonFactory.getPerson("student");

    }
}
